/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pagrafo.teste;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import pagrafo.arquivo.Arquivo;
import pagrafo.genetico.Cromossomo;
import pagrafo.grafo.Grafo;

/**
 *
 * @author Fabricio
 */
public class TesteCromossomoPronto {
    
    public static void main(String[] args) throws FileNotFoundException, IOException {
        
        int k = 5;
        Arquivo a = new Arquivo("grafo.vrp");
        Grafo g = a.getG();
        double capacidade = a.getCapacidade();
        
        Cromossomo cRef = new Cromossomo(g, k, capacidade, new int[]{0,21,31,19,17,13,7,26,0,12,1,16,30,0,27,24,0,29,18,8,9,22,15,10,25,5,20,0,14,28,11,4,23,3,2,6,0});
        System.out.println(cRef.getScore());
        
        Cromossomo c    = new Cromossomo(g, k, capacidade, new int[]{0,12,21,16,22,18,19,25,27,17,5,15,26,8,23,10,0,7,11,14,31,29,0,3,4,13,0,30,28,9,1,24,6,0,20,2,0});
        System.out.println(c.getScore());
        
        ArrayList<Cromossomo> cs = new ArrayList<Cromossomo>();
        cs.add(c);
        cs.add(cRef);
        Collections.sort(cs);
        for(Cromossomo b: cs){
            System.out.println("Score " + b.getScore());
        }
    }
    
}
